package com.zkingsoft.actions.visitor;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zkingsoft.actions.common.BaseController;
import com.zkingsoft.constance.Dictionary;
import com.zkingsoft.model.AdvertisementPosition;
import com.zkingsoft.plugin.util.WebUtil;
import com.zkingsoft.pojo.AjaxResult;
import com.zkingsoft.services.AdvertisementColumnService;
import com.zkingsoft.services.AdvertisementPositionService;

/**
 * @author chencai
 * @date 2016年7月29日10:31
 * @description 广告控制层
 */

@RequestMapping(value = "/advertising")
@Controller
public class AdvertisingController extends BaseController {

	@Resource
	private AdvertisementPositionService adPositionService;
	@Resource
	private AdvertisementColumnService advertisementColumnService;

	/**
	 * 根据广告栏名称查询广告位
	 */
	@RequestMapping(value = "/showAd")
	public @ResponseBody AjaxResult showAdvertising(String cloumName) {
		List<AdvertisementPosition> ads = adPositionService.findPointByCloumName(cloumName);
		return new AjaxResult(AjaxResult.STATUS_OK, null, "查询成功", ads, null);
	}
	


	
	

}
